home *** CD-ROM | disk | FTP | other *** search
- MASK(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- __mmaasskk, __mmaasskkll, __mmaasskkrr, MMAASSKK - Returns a bit mask
-
- SSYYNNOOPPSSIISS
- C/C++:
-
- ##iinncclluuddee <<iinnttrriinnssiiccss..hh>>
- lloonngg __mmaasskk ((lloonngg _i));;
- lloonngg __mmaasskkll ((lloonngg _i));;
- lloonngg __mmaasskkrr ((lloonngg _i));;
-
- Fortran:
-
- MMAASSKK (([II==]_i))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- C/C++: UNICOS and UNICOS/mk systems
-
- Fortran: UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- C/C++: Cray Research extension
-
- Fortran: CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran
- 90
-
- CC//CC++++ DDEESSCCRRIIPPTTIIOONN
- The __mmaasskk function forms a mask of bits set to 1, left-justified or
- right-justified. If 0 <= _i <= 63, a left-justified mask of bits set
- to 1, _i bits long, is formed. Otherwise, a right-justified mask of
- bits set to 1, (128 - _i) bits long, is formed. Value _i must be in the
- range of 0 through 128.
-
- The __mmaasskkll function returns a left-justified mask of _i bits set to 1.
- Value _i must be in the range of 0 through 64.
-
- The __mmaasskkrr function returns a right-justified mask of _i bits set to 1.
- Value _i must be in the range of 0 through 64.
-
- Because these are intrinsic functions, no externally visible library
- functions are available for them. The compiler generates inline code
- to produce the result.
-
- FFOORRTTRRAANN DDEESSCCRRIIPPTTIIOONN
- The MMAASSKK function returns a bit mask of 1's.
-
- On UNICOS systems, the argument is a 64-bit integer.
-
- On UNICOS/mk systems, the argument is a 32-bit or 64-bit integer.
-
- On IRIX systems, the argument is an 8-bit, 16-bit, 32-bit, or 64-bit
- integer.
-
- It accepts the following argument:
-
- _i In Fortran, this must be an integer argument, as follows:
-
- * If _i is an 8-bit object, _i must be in the range 0 <= _i <= 16.
-
- * If _i is a 16-bit object, _i must be in the range 0 <= _i <= 32.
-
- * If _i is a 32-bit object, _i must be in the range 0 <= _i <= 64.
-
- * If _i is a 64-bit object, _i must be in the range 0 <= _i <= 128.
-
- MMAASSKK is an elemental function. The name of this function cannot be
- passed as an argument.
-
- This is an outmoded routine. Refer to the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e
- _M_a_n_u_a_l, _V_o_l_u_m_e _2, publication SR-3903, for information about outmoded
- features and their preferred standard alternatives.
-
- RREETTUURRNN VVAALLUUEESS
- In C/C++, the mask functions return a 64-bit object.
-
- In Fortran, MMAASSKK returns a Boolean result on UNICOS and UNICOS/mk
- systems. It returns an integer result on IRIX systems.
-
- When _i is a 64-bit object, the return values are of the following
- form:
-
- * If _i is in the range 0 <= _i <= 64, a left-justified mask of _i bits
- is returned.
-
- * If _i is in the range 65 <= _i <= 128, a right-justified mask of (128
- - _i) bits is returned.
-
- When _i is a 32-bit object, the return values are of the following
- form:
-
- * If _i is in the range 0 <= _i <= 32, a left-justified mask of _i bits
- is returned.
-
- * If _i is in the range 33 <= _i <= 64, a right-justified mask of (64 -
- _i) bits is returned.
-
- When _i is a 16-bit object, the return values are of the following
- form:
-
- * If _i is in the range 0 <= _i <= 16, a left-justified mask of _i bits
- is returned.
-
- * If _i is in the range 17 <= _i <= 32, a right-justified mask of (32 -
- _i) bits is returned.
-
- When _i is a 8-bit object, the return values are of the following form:
-
- * If _i is in the range 0 <= _i <= 8, a left-justified mask of _i bits is
- returned.
-
- * If _i is in the range 7 <= _i <= 16, a right-justified mask of (16 -
- _i) bits is returned.
-
- EEXXAAMMPPLLEESS
- Fortran: The following section of Fortran code shows the MMAASSKK
- function used with several different arguments. The bit patterns of
- the results are given.
-
- INTEGER I1, I2, I3
- ...
- I1 = MASK(3)
- I2 = MASK(64)
- I3 = MASK(127)
-
- -----------------------------------------------------
- | 1 | 1 | 1 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 |
- -----------------------------------------------------
- I1
-
- ---------------------------------------------
- | 1 | 1 | 1 | 1 | ... | 1 | 1 | 1 | 1 |
- ---------------------------------------------
- I2
-
- ---------------------------------------------
- | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 1 |
- ---------------------------------------------
- I3
-
- SSEEEE AALLSSOO
- A complete list of C/C++ intrinsic functions available on Cray
- Research systems is in the _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR
- -2179.
-
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-